﻿using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AcDotNetTool;
namespace _03编辑图形
{
    public class MirrorDemo
    {
        [CommandMethod("MirrorDemo1")]
        public void MirrorDemo1()
        {
            Database db = HostApplicationServices.WorkingDatabase;
            Circle c1 = new Circle(new Point3d(100, 100, 0), Vector3d.ZAxis, 50);
            ObjectId cId =  db.AddEnityToModelSpace(c1);

            Entity Ent = cId.MirrorEntity(new Point3d(200, 100, 0), new Point3d(200, 300, 0), true);
            db.AddEnityToModelSpace(Ent);

            Circle c2 = new Circle(new Point3d(100, 200, 0), Vector3d.ZAxis, 50);
            Entity ent2 = c2.MirrorEntity(new Point3d(200, 100, 0), new Point3d(200, 300, 0), true);
            //Entity ent3 = c2.MirrorEntity(new Point3d(200, 100, 0), new Point3d(200, 300, 0), false);
            db.AddEnityToModelSpace(c2,ent2);
        }
    }
}
